﻿@model IEnumerable<VOD.Models.Video>
@using VOD.Helpers
<div class="column clearfix yj">
    <div class="main">
        <div class="title">
            <div class="tab">
                <a href="#">@ViewBag.CategoryName</a>
            </div>
            <div class="ext">
                <span>今日更新 @ViewBag.UpdateNum 部</span> @Html.ActionLink(">>更多", "Index", ViewBag.CategoryEName as string,null, new { target="_blank" })
            </div>
        </div>
        <div class="mainShow">
            @if (Model.Count() == 0)
            {
                <p style="padding-left:30px;">暂无内容！</p>
            }
            else
            {
                <div class="keyNote">
                    @{
                    var i = 1;
                    foreach (var item in Model)
                    {
                        //第一部
                        if (i == 1)
                        {
                                <a href="@Url.Content("~/Video/Play/" + item.VideoID)" target="_blank" title="@item.Name">
                                    <img src="@Url.Content("~/Content/Images/VideoImg/" + item.VideoID + ".jpg")" onerror="javascript:this.src='@Url.Content("~/Content/images/nopic.jpg")'" width="200" height="280" />
                                </a>@Html.ActionLink(item.Name, "Play", "Video", new { id = item.VideoID }, new { target = "_blank", title = item.Name })
                                @Html.Raw("</div><div class=\"VideoList\">")
                        }
                        else if (i <= 5)
                        {
                                <dl>
                                    <dt><a href="@Url.Content("~/Video/Play/" + item.VideoID)" target="_blank" title="@item.Name">
                                        <span class="btn_nowPlay">立即播放</span>
                                        <img src="@Url.Content("~/Content/Images/VideoImg/" + item.VideoID + ".jpg")" onerror="javascript:this.src='@Url.Content("~/Content/images/nopic.jpg")'" width="90" height="120" />
                                        <span class="intro">
                                            @foreach(var type in item.VideoAndTypes){
                                                @:&nbsp;@type.VideoType.TypeName
                                            }
                                        </span> </a></dt>
                                    <dd>
                                        @Html.ActionLink(item.Name, "Play", "Video", new { id = item.VideoID }, new { target = "_blank", title = item.Name })
                                        <p>
                                            @item.ShortTitle</p>
                                    </dd>
                                </dl>
                            if (i == 5) { @Html.Raw("</div><div class=\"txtList\"><ul>"); }
                        }
                        else
                        {
                                <li>@Html.ActionLink(String.IsNullOrEmpty(item.LongTitle)?item.Name:String.Format(item.LongTitle,item.Name), "Play", "Video", new { id = item.VideoID }, new { target = "_blank", title = item.Name })</li>
                        }
                        i++;
                    }
                        @Html.Raw("</ul>")
                    }
            </div>
            }
        </div>
    </div>
    <div class="oth">
        @Html.ActionLink(">>更多", "Index", "Rank",null, new { @class = "more", target = "_blank" })
        <div class="tabs">
            <ul class="top">
                <li><a href="@Url.Content("~/Video/MiniRank/" + ViewBag.CategoryID+"?filter=day")" title="tabShow">日排行</a></li>
                <li><a href="@Url.Content("~/Video/MiniRank/" + ViewBag.CategoryID + "?filter=week")" title="tabShow">周排行</a></li>
                <li><a href="@Url.Content("~/Video/MiniRank/" + ViewBag.CategoryID + "?filter=month")" title="tabShow">月排行</a></li>
            </ul>
            <div id="tabShow">
                <!--ajax输出排行-->
            </div>
        </div>
    </div>
</div>
